Field of the Invention
Embodiments may relate to methods of controlling a codec negotiation of a gateway providing a codec capability offer, e.g. OLC according to the standard H.245, for establishing a data connection to a communication device. Embodiments may further relate to a computer program product for executing such a method and to a communication system for controlling the codec negotiation.
Background of the Related Art
Gateways are commonly used to connect a communication device of a Time-Division Multiplexing (TDM) network with another communication device of a Local Area Network (LAN). The communication device on the TDM-side of the gateway may be a Public Branch Exchange (PBX) system, whereas on the LAN-side of the gateway there may be at least one communication terminal such as an IP-phone. The gateway may comprise a Digital Signal Processor (DSP) resource in terms of processing power which is able to establish a limited number of simultaneous communication connections, often calls or phone calls, depending upon the amount of communication connections requested from the PBX system. The DSP resource may employ a Central Processing Unit (CPU) for processing the Data on the LAN-side of the gateway. In case the PBX system requires more resources for a special period of time, during which high loads appear, additional DSP hardware or additional CPU utilization on the processing source used from an existing DSP (the DSP may use the CPU resources of the Gateway) must be obtained to cover the demands of the PBX systems in terms of simultaneous communication connections, if the processing power of the DSP resource is not sufficient anymore to cover the number of simultaneous communication connections as requested by the PBX system. The communication connections on the LAN-side of the gateway are also called b-channels, abbreviated channels. In cases where the gateway experiences high loads such that the processing power of the DSP resource is not sufficient anymore to handle all requested communication connections, either one or several of the communication connections will be lost or additional hardware equipment has to be available instantly for additional usage of the gateway. It is a disadvantage, that the additional hardware to cover the present need of the gateway for additional processing power is not necessary for the predominant fraction of use of the PBX-system. Therefore, for the vast amount of use of the PBX-system, these additional hardware resources are unused and not required.
In order to enable the gateway to immediately access additional hardware resources in the event of an overload of the DSP resource, the gateway calculates the total number of channels which can be handled simultaneously by the DSP resource of the gateway before additional hardware resources are needed. At present there are two ways to handle the resources of the gateway depending on the way the maximum total number of channels which can be handled simultaneously by a given DSP resource is calculated. The static and dynamic gateway resource handling methods, each of them also called static/dynamic implementation, are explained based on the communication system of FIG. 1. The PBX communication device 9 of a TDM network (Time Division Multiplex) is linked to a gateway 1 comprising a DSP 5 wherein the gateway 1 is linked to an IP phone 10 of a local area network wherein the IP phone may be another gateway, e.g. a gateway connected via an IP network, or an IP endpoint or device. The DSP comprises a DSP resource 5A, 5B wherein the DSP resource 5A is used to establish and/or maintain 8 channels C1-C8. The DSP resource 5B is unused, 8 and able to handle more channels, C9, CN depending on the implementation used wherein N is an integral number/integer equal or larger than 10 indicating the total number of channels of the implementation used. From the 8 used channels, the channels C1-C5 are used by the gateway to encode data and transmit the data, 1A, to the IP phone 10. Data from the IP phone 10 is transmitted, NA, to the gateway and decoded by the DSP 5, wherein for encoding and decoding a codec G729, 6, is used. The used channels C6-C8 are encoded and decoded by using the codec G711, 7. The encoded and decoded data is transferred from the gateway 1, 1B, to the PBX and data from the PBX, 9 is transferred, 9A, to the gateway 1 for further transmission via the gateway 1 to the IP phone 10. While the codec G729 compresses data to be encoded, it is called a compressed codec which leads to a data transmission rate of 624 kB/s in a case of a total number of ten bidirectional channels. The codec G711, 7, is not compressing the data to be encoded and therefore called an uncompressed codec leading in the case of a total number of ten bidirectional channels to a data transmission rate of 1744 kB/s. In FIG. 2, a diagram of the available number of channels, NC, depending on the usage of a CPU of the DSP resource, CU, is depicted for the codec G729, 6, and G711, 7. With the static gateway resource handling method, also called static implementation, the number of gateway calls, represented by the number of channels (b-channels) is calculated statically and hardcoded as well as communicated to required components at the start-up of the communication system. The calculation of the number of channels is performed based on a scenario, where the DSP resource not used, 8, will be employed by a codec reserving the largest amount of DSP resource, in the case of FIG. 1 the compressed codec G729, 6. The calculation based on a codec reserving the largest amount of DSP resource is performed since the codec negotiation between the gateway 1 and the IP phone 10 cannot be predicted. Without a channel being processed by the DSP resource 5A, 5B, the DSP resource uses 7% of its CPU in an idle state, I. For each channel using the codec G711, 7, 4% of the CPU usage, CU, and for each channel using the codec G729, 6, 6% of the CPU usage, CU, are reserved. Leaving a reserve necessary for reliability reasons of 20% of the CPU, 80% of the CPU minus 7% for the idle state of the DSP 5, leading to 73% of the available CPU usage, CU for channel reservation. The allowed CPU usage, 5CA, of 80% of the CPU usage, CU is shown in FIG. 2 with dots. In the static implementation, the maximum total number of channels by using the codec G729, 6, is 12, wherein the maximum total number of channels for the codec G711, 7, is 18 (in FIG. 2 a CPU of 300 MHz clock frequency is assumed). Since both codecs 6, 7 are available for the gateway 1, in static implementation, a maximum total number of channels available for the gateway 1 is predicted to 12, N12, since it cannot be predicted whether the unused resources, 8, will only be reserved by the uncompressed codec G711, 7 which would lead to a maximum total number of 18 channels, N18. Regardless of the codec 6, 7 used in active calls reserving channels C1-C8 and with it the used DSP resource, 5A, only 12 gateway calls, N12, can be performed. This implementation is characterized by simplicity, stability and fixed DSP resources, but also by a not optimal CPU usage, CU, since additional hardware resources are required by the gateway 1 when the PBX 9 requires more than 12 channels even though there might be CPU resources left if not all of the used 12 channels are channels encoded and decoded by the compressed codec G729, 6.
The dynamic gateway resource handling method, also called dynamic implementation, ensures—in contrast to the static implementation—an optimal CPU usage, CU allowing the IP phone 10 and the gateway 1 to dynamically select a codec 6, 7, and constantly recalculating the available resource of the gateway 1. Free codec negotiation is formatting available channel resources of the gateway 1, which in the case of FIG. 1 is the unused DSP resource, 5B, according to codec selection. If only the uncompressed codec G711, 7, would be used in future communication connections, the maximum total number of channels would be 18, N18 which would represent the optimal CPU usage. However, since this maximum number of channels cannot be ensured as it is possible that not only uncompressed codec G711, 7, but also or exclusively the compressed codec G729, 6, will be used, the dynamic implementation only ensures the optimal CPU usage based on the selected codec. The availability of a maximum total number of channels therefore has no fixed value but is in a range between the maximum total number of channels for the static implementation, N12, and the maximum total number of channels for the optimal CPU usage when only uncompressed codec G711, 7 is used, N18. It is a disadvantage of the dynamic implementation that the total number of channels available does not have a fixed value, but may range somewhere between 12 and 18 channels. Especially during a busy hour of the gateway 1 it is thus not possible to precisely predict a necessity of additional hardware resources.